#include<iostream>
#include<vector>
#include<algorithm>


bool fun(int a)
{
    if (a == 1)
    {
        return true;
    }
    else

        return false;
}
using namespace std;
int main()
{
    int a[] = { 1,2,3,4,5,6,7,9 };
    vector<int> v(a,a+8);
    vector<int>::iterator it1= find(v.begin(), v.end(), 5);//*it = 5
    cout << *it1 << endl;
    it1 = find(v.begin(), v.end(), 9);//*it = 0
    cout << *it1<<endl;
    
    vector<int>::iterator it2 = find_if(v.begin(), v.end(), fun);
    cout << *it2<<endl                                               ;
}